/*
  @author: 13813
  @date: 2024/11/11 16:16
*/
public class ArrayDemo02 {
    public static void main(String[] args) {
        String[] arr = {"张三", "李四", "王五"};
        //存
        arr[0] = "张三三";
        //取
//        System.out.println(arr[2]);

        //求数组中的最大值
        int[] arr2 = {6, 2, 9, 12, 1, 30};

        int max = arr2[0];
        for (int i = 0; i < 6; i++) {
            if (arr2[i] > max) {
                max = arr2[i];
            }
        }

//        System.out.println(max);

        arr2 = null;//空

    }
}
